require 'open-uri'
require 'rexml/document'

GET_CATEGORY_URI = 'http://localhost:3000/categories/show/'
LIST_CATEGORIES_URI = 'http://localhost:3000/categories'

def get_category(categoryID)
	response = open("#{GET_CATEGORY_URI}#{categoryID}.xml").read 
	#document = REXML::Document.new(response)

	#REXML::XPath.each(document, '/ResultSet/Result/Title/[]') do |title|
	#	puts title
	#end

end

def list_categories
	responce = open(LIST_CATEGORIES_URI).read
end

category1 = get_category('1')
puts category1

puts list_categories
